//
//  GameScene.h
//  iSuDoku
//
//  Created by maccctk on 09-6-23.
//  Copyright 2009 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "cocos2d.h"
#import "Question.h"

@class Question;
@class Label;
@class GameLayer;

@interface GameScene : Scene {
	GameLayer *gl;
	int level;
}

- (void)setLevel:(int)lv;

@end

@interface GameLayer : Layer {
	MenuItemFont *ditem[81];
	int dindex;

	Menu *kmenu;
	MenuItemFont *kitem[10];
	int kindex;

	MenuItemFont *citem[6];
	
	Sprite *keypad;
	
	Label *levelLabel;
	Label *timeLabel;
	Label *difficultyLabel;
	
	Sprite *hardSprite[4];
	Sprite *easySprite[4];
	
	int level;
	time_t begin_time;
	int cur_times;
	
	Question *question;
	char *cur_question;
	
	char board[9][9];
	
	board_item_t stack[81];
	int stack_num;
	char calcLine[81];
}

- (void)setLevel:(int)lv;
- (void)updateDifficulty;
- (void)digitClicked:(id)sender;
- (void)keyboardClicked:(id)sender;
- (void)cmdClicked:(id)sender;
- (bool)isExisted:(int)i :(int)j :(char [9][9])myBoard;
- (bool)isFull:(char [9][9]) myBoard;

@end
